
def const(context, config)
  if config.is_a?(Array)
    context.entries = config
  else
    context.entries = [config]
  end

  context.entries = context.entries.map do |entry|
    e = Rire::Entry.new
    walk_hash(e, entry)
  end
end

def walk_hash(entry, hash)
  hash.each_pair do |k, v|
    if v.is_a?(Hash)
      e = Rire::Entry.new
      walk_hash(e, v)
      entry.send(k, e)
    else
      entry.send(k, v)
    end
  end

  entry
end

